<?
require_once("admin/classes/check_customer_session.php");
require_once("admin/dbconnect.php");
require_once('admin/classes/PaginateIt.php'); 
$PaginateIt = new PaginateIt();
$PaginateIt->SetItemsPerPage(16);
$PaginateIt->SetLinksToDisplay(8);
$PaginateIt->SetLinksFormat( '<< Previous', '  ', 'Next >>' );

$PaginateIt->SetQueryString("");

session_start();

?>
<?
                
                $sql = "SELECT id, album_type, image FROM photo_album";
//        $sql.= "and customer.status = 'Y'";

                  
                #$sql .= "order by photo_album.id DESC";
                $rs = mysql_query($sql) or die(mysql_error());
                $cnt = mysql_num_rows($rs);
                $sql .= $PaginateIt->GetSqlLimit();
                $rs = mysql_query($sql) or die(mysql_error());
				$PaginateIt->SetItemCount($cnt);

                ?>
<?php require_once('include/header.php'); ?>



      <div id="middle_container_for_innerpage">
      <div id="innerpage_top_image"><img src="images/images/innerpage_top_corner_820x5.jpg"  height="5" /></div> 
      <div id="middle_inner_container">
      <?php require_once('include/left_menu.php'); ?>
        
        <div id="inner_page_middle_data">
        	<div id="page_heading">Photo Gallery of Dr. Babasahed and Buddha </div>
       	    <div id="keyword_search">
            
            <?
        if(@mysql_num_rows($rs)>0){
                                ?>
		<p><strong>Total number of Profile <?php echo $b; ?> to <?php echo $pagecount_1+ $b; ?> out of <?php echo $cnt; ?></strong></p>
        <? if ($cnt > 11) {?>
        <? } ?>
        </div>
		<?  while($row=mysql_fetch_array($rs)){ ?>
            
       	  <div align="center" id="photo_search_container">
                	<div id="photo_search_photo">
                    <?if($row['image']){?>
					
					<a href="javascript:popup('big_images.php?id=<?=$row['id']?>',620,620,10,10,'myWin');"><img src="uploaded/photo_gallery/thumb/<?=$row['image']?>"  border="0" /></a>
                                 <?}?>
                    </div>
            <div id="photo_search_name"><div id="profile_photo_zoom"><div id="small_icon"><a href="javascript:popup('big_images.php?id=<?=$row['id']?>',620,620,10,10,'myWin');"><img src="images/images/zoomIn.gif" alt="Enlarge photo" width="18" height="18" border="0" /></a></div>
                    <a href="javascript:popup('big_images.php?id=<?=$row['id']?>',620,620,10,10,'myWin');">Enlarge photo</a></div></div>
          </div>
                <? }

        } else { ?>
		<div id="no_results_message">Sorry!! No results found.</div> <? } ?>
        <div id="search_pages_links" style="padding-top:10px; padding-bottom:10px; padding-left:130px; width:410px;"><? echo $PaginateIt->GetPageLinks(); ?> </div>


      </div> 
      <div id="corner_container_bottom_for_innerpage"><img src="images/images/innerpage_bottom_corner_820x10.jpg"  height="10" /></div>
    </div> 
      <!-- middle_container ends -->
    
    
        
    
<?php require_once('include/footer.php'); ?>
